package com.xz.log.log4j.sample;

import org.apache.log4j.Logger;

/**
 * Created by fingal on 2018/7/18.
 */
public class Log4jSample {

    private static final Logger logger = Logger.getLogger(Log4jSample.class);

    private Log4jSample() {}

    private static final Log4jSample INSTANCE = new Log4jSample();

    public static Log4jSample getInstance() {
        return INSTANCE;
    }

    public void log() {
        logger.trace("this is a trace log...log4j");

        logger.debug("this is debug log...log4j");

        logger.info("this is info log...log4j");

        logger.warn("this is warn log...log4j");

        logger.error("this is error log...log4j");
    }

}
